import {Interceptor} from "../core/Interceptor";
import {EasyACtx} from "../core/EasyACtx";
/*
 */

//结束EasyA 框架处理 ---- 再往后就是 express 处理了
export class EasyAEndInterceptor extends Interceptor{
    constructor(){
        super({
            forceContinue:true,
        });
    }

    after(ctx: EasyACtx) {

        //计算时间差
        ctx.mm.eTime =  (new Date()).getTime() - ctx.startTime;
        let res = ctx.res;
        res.send(ctx.mm);
    }

}